<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>滴答办公系统-班级新增</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/media/layui/css/layui.css" media="all">
<script type="text/javascript" src="/media/js/jquery.min.js"></script>
	<script>
		function verifypass() {
			var oldpass= $("[name='oldpass']").val();
			// alert(oldpass)
			if (oldpass==''){
				$("[name='oldpass']+span").text("原密码不能为空").css("color","red");
				return false;
			}else {
				$("[name='oldpass']+span").text("");
			}

			var newpass =$("[name='newpass']").val();
			// alert(newpass);
			if (newpass==''){
				$("[name='newpass']+span").text("密码不能为空").css("color","red");
				return false;
			}else {
				$("[name='newpass']+span").text("");

			}
			var surepass = $("[name='suernewpassword']").val();
			if (surepass!=newpass){
				$("[name='suernewpassword']+span").text("两次密码不一致").css("color","red");
				return false;
			}else {
				$("[name='suernewpassword']+span").text("");
			}
			return true;
		}
	</script>
</head>
<body>
	<div class="layui-container" style="margin-top: 5px">
		<form class="layui-form" action="/User_updatepassword" method="post" onsubmit="return verifypass();">
			<div class="layui-form-item">
				<label class="layui-form-label">原始密码</label>
				<div class="layui-input-block">
					<input type="text" name="oldpass" lay-verify="name" autocomplete="off"
						placeholder="请输入密码" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">新密码</label>
				<div class="layui-input-block">
				 <input type="password" name="newpass" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">确认新密码</label>
				<div class="layui-input-block">
			      <input type="password" name="suernewpassword" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<input class="layui-btn"  style="margin-left: 10%" type="submit" value="确认修改">
			</div>
		</form>
	</div>


	<script src="/media/layui/layui.js"></script>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
	var form;
		layui.use([ 'form', 'laydate' ],
				function() {
				form = layui.form, layer = layui.layer, laydate = layui.laydate;
						//日期
						laydate.render({
							elem : '#date'
						});
						initData();
		});
		
	</script>
</body>
</html>